{extend name='public/form'/}
{block name='fields'}
{:token_field()}
<input type="hidden" name="id" value="{$row['id']}">
<div class="layui-form-item">
    <label class="layui-form-label">字段名</label>
    <div class="layui-input-block">
        <input type="text" name="names" value="{$row['names']}" required lay-verify="required" placeholder="请输入字段名" autocomplete="off"
            class="layui-input">
    </div>
</div>
{if empty($fields)}
<div class="layui-form-item layui-form-text">
    <label class="layui-form-label">字段值</label>
    <div class="layui-input-block">
      <textarea name="values" placeholder="请输入字段值" class="layui-textarea">{$row['values']}</textarea>
    </div>
</div>
{else /}
{$fields|build_form=$default|raw}
{/if}
{/block}